<template>
	<view style="height: 100%;background: #f2f2f2;">
		<view class="person-top-banner">
			<view class="top-person tc">
				<view class="img-photo">
					<image src="https://img-cdn-tc.dcloud.net.cn/uploads/avatar/000/88/01/68_avatar_max.jpg" class="image" mode="widthFix">
				</view>
				<view class="b f-40 name-text white pt-40">182****5698</view>
			</view>
		</view>
		<template v-for="item in meunList">
			<view class="clear h-30"></view>
			<view class="bg-fff h list-person-mune">
				<view :class="'item-box icon-'+child.code" v-for="child in item.child" @click="tapMeun(child)">
					{{child.name}}
				</view>
			</view>
		</template>
	</view>
</template>

<script>
	export default {
		components: {
			
		},
		data() {
			return {
				updateShow:false,
				hasNewVersion:true,
				version:'1.12.12',
				userInfo: {
					name: '张山',
					post: '职务名称',
					unitName: '县扶贫开发工作办公室'
				},
				meunList:[
					{
						type:'read',
						child:[
							{
								name:'资料修改',
								code:'information',
								url:'/pages/person/edit-information'
							},
							{
								name:'我的任务',
								code:'history',
								url:'/pages/person/list'
							}
						]
					},
					{
						type:'btn',
						child:[
							{
								name:'关于我们',
								code:'about',
								url:'/pages/person/about'
							},
							{
								name:'退出系统',
								code:'out',
								url:'/pages/person/list'
							}
						]
					}
				]
			}
		},
		onLoad() {

		},
		methods: {
			tapMeun(child){
				if(child.code === 'information'){
					uni.navigateTo({
						url: child.url
					})
				} else if(child.code === 'out'){
					uni.showModal({
						title: '温馨提示',
						content: '确认要退出登录',
						success: function(res) {
							if (res.confirm) {
								console.log('用户点击确认');
							} else if (res.cancel) {
								console.log('用户点击取消');
							}
						}
					});
				} else{
					uni.navigateTo({
						url: child.url
					})
				}
			}
		}
	}
</script>

<style>
</style>
